﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/masAdmin.master" AutoEventWireup="true"
    CodeFile="DistributorDetail.aspx.cs" Inherits="admin_DistributorDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../scripts/common.js"></script>
      <script type="text/javascript" src="../scripts/jQuery.min.js"></script>
    <script type="text/javascript" src="../scripts/jquery.maskedinput-1.2.2.js"></script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
    <div class="content-box-header">
        <h3>
            Distributor Detail
        </h3>
    </div>
    <!-- End .content-box-header -->
    <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
            <table border="0" cellpadding="0" cellspacing="0" class="table100">
                <tr>
                    <td colspan="2">
                        <span class="commentRequireInputText">
                            <%=Resources.Resource.LBL_REQUIREMENT%>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td align="left">
                        <asp:ValidationSummary ID="vsumDistributor" runat="server" ShowMessageBox="true" ShowSummary="false"
                            CssClass="errorMessage" />
                        <asp:Label ID="lblErrorMessage" runat="server" CssClass="errorMessage"></asp:Label>
                    </td>
                </tr>
                <tr id="trCountry" runat="server">
                    <td align="right">
                        Country(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:DropDownList ID="ddCountry" runat="server" CssClass="combobox" Width="235px"
                            AutoPostBack="false">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="reqCountry" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="Country is require"
                            Display="Dynamic" ControlToValidate="ddCountry">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td style="width: 250px;" align="right">
                        Company Name(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:TextBox ID="txtCompanyName" runat="server" Width="500px"
                            MaxLength="128"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqCompanyName" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="Company Name is require"
                            Display="Dynamic" ControlToValidate="txtCompanyName">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Contact Name(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:TextBox ID="txtContactName" runat="server" Width="500px"
                            MaxLength="128"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqContactName" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="Contact Name is require"
                            Display="Dynamic" ControlToValidate="txtContactName">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Address 1(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:TextBox ID="txtAddress1" runat="server" Width="500px"
                            MaxLength="128"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqAddress1" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="Address 1 is require"
                            Display="Dynamic" ControlToValidate="txtAddress1">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Address 2:
                    </td>
                    <td>
                        <asp:TextBox ID="txtAddress2" runat="server" MaxLength="128" Width="500px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        City(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:TextBox ID="txtCity" MaxLength="50" runat="server" Width="500px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqCity" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="City is require"
                            Display="Dynamic" ControlToValidate="txtCity">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr id="trState" runat="server">
                    <td align="right">
                        State(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlState" runat="server" CssClass="combobox" Width="235px">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="reqState" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="City is require"
                            Display="Dynamic" ControlToValidate="ddlState">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblZipCode" runat="server" Text="ZIP / Postal code">
                        </asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtPostalCode" runat="server" Width="230px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqPostalCode" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="Postal is require"
                            Display="Dynamic" ControlToValidate="txtPostalCode">*</asp:RequiredFieldValidator>
                        <asp:CustomValidator ID="cusPostalCode" runat="server" EnableClientScript="true"
                            Display="Dynamic" ErrorMessage="RequiredFieldValidator" OnServerValidate="CheckSZipCode"
                            SetFocusOnError="true" ClientValidationFunction="CheckCZipCode" ControlToValidate="txtPostalCode"
                            CssClass="errorMessage">*</asp:CustomValidator>
                    </td>
                </tr>
                <tr id="trProvince" runat="server">
                    <td align="right">
                        Province / Region(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:TextBox ID="txtProvince" runat="server" Width="500px"
                            MaxLength="128"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqProvince" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="Postal is require"
                            Display="Dynamic" ControlToValidate="txtProvince">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Phone(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:TextBox ID="txtPhone" runat="server" Width="500px" MaxLength="30"></asp:TextBox><font
                            color="#999999">(XXX-XXX-XXXX)</font>
                        <asp:RequiredFieldValidator ID="reqPhone" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="Postal is require"
                            Display="Dynamic" ControlToValidate="txtPhone">*</asp:RequiredFieldValidator>
                        <asp:CustomValidator ID="cusPhone" runat="server" SetFocusOnError="true" EnableClientScript="true"
                            Display="Dynamic" ErrorMessage="RequiredFieldValidator" CssClass="errorMessage"
                            OnServerValidate="CheckSPhone" ClientValidationFunction="CheckCPhone" ControlToValidate="txtPhone">*</asp:CustomValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Fax:
                    </td>
                    <td>
                        <asp:TextBox ID="txtFax" runat="server" Width="500px" MaxLength="30"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Email(<span class="commentRequireInputText">*</span>):
                    </td>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server" Width="500px" MaxLength="256"></asp:TextBox>
                        <font color="#999999">username@hostname.com</font>
                        <asp:RequiredFieldValidator ID="reqEmail" runat="server" EnableClientScript="true"
                            SetFocusOnError="true" CssClass="errorMessage" ErrorMessage="Postal is require"
                            Display="Dynamic" ControlToValidate="txtEmail">*</asp:RequiredFieldValidator>
                        <asp:CustomValidator ID="cusEmail" CssClass="errorMessage" runat="server" EnableClientScript="true"
                            Display="Dynamic" ErrorMessage="RequiredFieldValidator" OnServerValidate="CheckSEmail"
                            SetFocusOnError="true" ClientValidationFunction="CheckCEmail" ControlToValidate="txtEmail">*</asp:CustomValidator>
                    </td>
                </tr>
              
                <tr>
                    <td align="right">
                        Active:
                    </td>
                    <td>
                        <asp:CheckBox ID="chkIsActive" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Note:
                    </td>
                    <td class="distributorFormControl">
                        <asp:TextBox ID="txtComment" runat="server" Width="500px" Height="200px"
                            MaxLength="512" TextMode="MultiLine"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td style="height: 40px;" valign="bottom">
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Text="Save" OnClick="btnSave_Click"
                            CausesValidation="true" />
                        <asp:Button ID="btnCancel" runat="server" CssClass="button" Text="Cancel" OnClick="btnCancel_Click"
                            CausesValidation="false" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <script>
        jQuery(document).ready(function ($) {

            $("#<%=txtPhone.ClientID %>").mask("999-999-9999");

        });
    </script>
    <script type="text/javascript">
        function CheckCZipCode(oSrc, args) {

            args.IsValid = CheckZipCodeValid(args.Value);

        }
        function CheckCPhone(oSrc, args) {

            args.IsValid = CheckPhoneValid(args.Value);
        }
        function CheckCEmail(oSrc, args) {

            args.IsValid = CheckEmailValid(args.Value);

        }
    </script>
</asp:Content>
